<?php
if (!defined('SYSTEM_ROOT')) { die('Insufficient Permissions'); }
class header{
    static function title(){
        return SYSTEM_NAME;
    }
    static function cj(){
        return '
        <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
	    <link rel="stylesheet" href="../public/source/css/ui.css">
	    <script src="http://cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
	    <script src="http://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        ';
    }

    static function layout(){
        if(defined('LOGIN')){
            return '<li><a href="index.php?mod=admin:logout">退出登录</a></li>';
        } else {
            return '';
        }
    }

    static function islogin(){
        if(defined('LOGIN')){
            return
                '
                <li '.(SYSTEM_PAGE=="index" ? "class=active" :"").'><a href="index.php?mod=index">账务概况</a></li>
				<li '.(SYSTEM_PAGE=="set" ? "class=active" :"").'><a href="index.php?mod=set">个人设置</a></li>
				<li '.(SYSTEM_PAGE=="expense" ? "class=active" :"").'><a href="index.php?mod=expense">收支记账</a></li>
				<li '.(SYSTEM_PAGE=="records" ? "class=active" :"").'><a href="index.php?mod=records">收支记录</a></li>
                ';
        } else {
            return
                '
                <li '.(SYSTEM_PAGE=="login" ? "class=active" :"").'><a href="index.php?mod=login">登录</a></li>
                ';
        }
    }
}
?>